import java.lang.reflect.Proxy;

public class Main {
    public static void main(String[] args) {
        UserService userService=new UserServiceImpl();
        MyProxyHandler handler=new MyProxyHandler(userService);
        UserService proxyObject=(UserService) Proxy.newProxyInstance(
                UserService.class.getClassLoader(),
                new Class<?>[]{UserService.class},
                handler
        );
        proxyObject.getUserByID();
    }


}
